import 'package:dio/dio.dart';

import 'error_code.dart';

class HttpException implements Exception, Code {
  HttpException({this.code, this.msg, this.response, this.stackTrace});

  final int? code;
  final String? msg;
  final Response? response;
  final StackTrace? stackTrace;

  @override
  String toString() =>
      "HttpException [$code]:" +
      (msg ?? "") +
      (stackTrace?.toString() ?? "").toString();
}
